<template>
	<view class="public_view">
		<div class='customer_width' >
			<div class='customer_list' v-for="(item,index) in runDataSorce" @click="open(item.id)">
				<div class='customer_div'>
					<div>
						<text class="public_div_text">商机标题:</text>
						<text class="public_div_text_one">{{item.title}}</text>
					</div>
					<div>
						<text class="public_div_text">商机类型:</text>
						<text class="public_div_text_one">{{item.type}}</text>
					</div>
					<div>
						<text class="public_div_text">成交可能性:</text>
						<text class="public_div_text_one">{{item.dealProbability}}</text>
					</div>
					<div>
						<text class="public_div_text">商机获取日期:</text>
						<text class="public_div_text_one">{{item.getDate}}</text>
					</div>
				</div>
			</div>
		</div>
		<popus ref="alert" >
			<div :style="alertWidth">
				<acitdetals :selid="selid" @closes="closes"></acitdetals>
			</div>
		</popus>
	</view>
</template>

<script>
import acitdetals from '@/pages/common/index/subpage/business/businessdetals'	
import popus from '@/uni_modules/uni-popup/components/uni-popup/uni-popup'
import {pages,list} from '@/common/api/job/jobapi.js'
export default {
	props:{
		dataSorc: ''
	},
	components:{
		popus,
		acitdetals
	},
	data(){
		return {
			runDataSorce: [],
			alertWidth: '',
			selid:'',
		}
	},
	mounted() {
		this.runDataSorce = this.dataSorc;
		let _this = this;
		uni.getSystemInfo({
		    success: function (res) {
				_this.alertWidth = 'width:' + res.windowWidth + 'px;'
		    }
		});
	},
	methods:{
		open(val) {
			this.selid = val;
		    this.$refs.alert.open('left');
		},
		closes(val){
			if(val == 1){
				this.$refs.alert.close();
				location.reload();
			}else{
				this.$refs.alert.close();
			}
		}
	}
}
</script>

<style scoped lang="scss">
.public_view {
	height: 100%;
	width: 100%;
}

.public_div_text_one {
	padding: 0 0 0 20rpx;
	overflow: hidden;
}

</style>
